<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/8/19
 * Time: 16:19
 */
class 获取IP地址获取当前时间写文件
{

}

function WriteIPMark($strFile)
{
    $ip=$_SERVER["REMOTE_ADDR"];
    $str_date = date('Y-m-d H:i:s',time());

    $fp = fopen($strFile, "a");
    if($fp)
    {
        fwrite($fp,$ip);
        fwrite($fp," ");
        fwrite($fp,$str_date);
        fwrite($fp,"\r\n");
    }
    fclose($fp);
}